package java8_6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class GetAvg {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double sum=0;
        double s=0;
        for(int i=1;i<=5;i++){
            System.out.println("请输入第"+i+"门课的成绩：");
            s=in.nextDouble();
            sum+=s;
        }
        double avg=sum/5;
        System.out.println("平均分是："+avg);
    }
}
